package com.itheima.service;

import com.itheima.pojo.User;
import com.itheima.service.impl.ConsumerServiceImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * <dl>
 * <dd>描述: ~节点业务逻辑实现</dd>
 * <dd>创建时间：  9:45 2020/7/21</dd>
 * <dd>创建人： zz</dd>
 * <dt>版本历史: </dt>
 * <pre>
 * Date         Author      Version     Description
 * ------------------------------------------------------------------
 * 2020/7/21      guodong       1.0        1.0 Version
 * </pre>
 * </dl>
 */
@FeignClient(value = "user-service",
        fallback = ConsumerServiceImpl.class/*,
        configuration = FeignLogConfig.class*/)
public interface ConsumerService {
    /*
        根据id查找用户
        String url = "http://user-service/user/findUserById/" + id;
     */
    @GetMapping("/user/findUserById/{id}")
    User findUserById(@PathVariable("id") Integer id);
}
